<?php echo CHtml::label("Employee's profiles",'member'); ?>
<div class="row">
    <?php echo CHtml::activeDropDownList($member,"type",company_members::model()->memberType,array('watermark'=>'Member Roles')); ?>
    <?php echo CHtml::activeTextField($member, "name",array('watermark'=>'Member name')); ?>
</div>
<div id="contacts" class="row">
        <?php foreach($member->contacts as $i=>$item):?>
        <div class="row">
            <?php echo CHtml::activeDropDownList($item, "[$i]type", company_members_contacts::model()->teleType); ?>
            <?php echo CHtml::activeTextField($item,"[$i]ref",array('maxlength'=>35,'watermark'=>'Contact number')); ?>
        </div>
        <?php endforeach; ?>
</div>
<div id="email" class="row">
    <?php foreach($member->email as $i=>$item):?>
        <div class="row">
            <?php echo CHtml::activeDropDownList($item, "[$i]type",company_members_email::model()->emailType); ?>
            <?php echo CHtml::activeTextField($item,"[$i]ref",array('maxlength'=>254,'watermark'=>"Email address")); ?>
        </div>
    <?php endforeach; ?>
</div>